package usersDao

import (
	"chart.zozoo.net/app/models"
	"chart.zozoo.net/core/mysql"
)

// Info 根据真实id获取用户信息
func Info(id int) (u *models.Users, err error) {
	u = &models.Users{}
	u.Id = id
	row := mysql.MysqlClient.
		Select("uuid", "username", "headimgurl", "nickname", "city", "profile").
		First(u)
	if row.Error != nil {
		return nil, row.Error
	}

	return u, nil
}
